package com.xmg.design23.d20_command;

/**
 * @Author: mazhongqing
 * @Date: 2021/3/25 14:38
 */
public class Invoker {
    private Command command;
    public Invoker(Command command){
        this.command = command;
    }

    public Command getCommand() {
        return command;
    }

    public void setCommand(Command command) {
        this.command = command;
    }

    public void call(){
        System.out.println("调用者执行命令command。。。");
        command.execute();
    }
}
